import Item from '../Item/index.jsx'
import { Component } from 'react';

class App extends Component{
  deleteTodo = (id) => {
    console.log(id,this.props,'idd');
    this.props.deleteTodo(id)
  }
  changeCheck = (id,status) => {
    this.props.changeCheck(id,status)
  }
  render() {
    const {todos} = this.props
    return (
      <div>
        {todos.map(i => {
          return <Item item={i} key={i.id} deleteTodo={this.deleteTodo} changeCheck={this.changeCheck} />
        })}
      </div>
    );
  }
  
}

export default App;
